namespace TestingIntroduction
{
	using System.Collections.Generic;

	public class NightlyBatch
	{
		private readonly IEmailConfiguration _Configuration;
		private readonly IEmailManager _EmailManager;

		public NightlyBatch(IEmailManager emailManager, IEmailConfiguration configuration)
		{
			_EmailManager = emailManager;
			_Configuration = configuration;
			Failures = new List<string>();
		}

		public List<string> Failures { get; set; }

		public void SendSummary()
		{
			//if (Failures.Count == 0)
			//{
				var emails = _Configuration.GetSuccessList();
				_EmailManager.SendSuccessEmail(emails);
			//}
		}
	}
}